Skip to content

fix: pause active goals on app background - #37

Merged
BunsDev merged 1 commit into
mainfrom
fix/goal-background-pause
Aug 1, 2026
Merged

fix: pause active goals on app background#37
BunsDev merged 1 commit into
mainfrom
fix/goal-background-pause

Conversation

@BunsDev

@BunsDev BunsDev commented Aug 1, 2026

Copy link
Copy Markdown
Member

Persists and cancels an active on-device goal when the app enters the background, keeping goal execution within the foreground lifecycle.

Validation:

  • swiftlint lint --strict
  • xcodebuild build for iPhone 16 Pro simulator

Copilot AI review requested due to automatic review settings August 1, 2026 07:47
@BunsDev
BunsDev force-pushed the fix/goal-background-pause branch from 73dfbac to b9ae9a3 Compare August 1, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds durable on-device goal support (storage + FFI + Swift orchestration) and pauses active goals when the app backgrounds, keeping goal execution within the foreground lifecycle while exposing progress via UI and Live Activity scaffolding.

Changes:

  • Introduces a checked, path-scoped goal SQLite store and wires goal cleanup into session deletion/fork flows (Rust).
  • Adds goal lifecycle APIs to the UniFFI surface and implements an autonomous goal runner that persists durable goal output separately from working context (Rust).
  • Adds /goal parsing, goal UI card + background pause hook, and an ActivityKit + WidgetKit extension for goal progress presentation (Swift/iOS).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rust/ffi/src/sessions.rs Adds checked GoalStorage and integrates goal cleanup into session artifact deletion.
rust/ffi/src/lib.rs Exposes the new goals module and a reconcile_goals engine entry point.
rust/ffi/src/goals.rs Implements goal lifecycle helpers (create/pause/resume/reconcile/continue) and goal snapshot types.
rust/ffi/src/chat.rs Adds goal execution loop, goal-only tool registry (GoalComplete), durable-message journaling, and uses canonical session ID in ToolContext.
rust/Cargo.toml Bumps pinned coven-code engine rev to pick up upstream goal APIs.
rust/Cargo.lock Updates lockfile to match the engine rev bump.
project.yml Adds version settings and a WidgetKit app-extension target for goal widgets.
docs/superpowers/specs/2026-07-31-on-device-goals-design.md Adds the on-device goals design/spec doc.
app/Tests/GoalCommandParserTests.swift Adds test coverage for /goal command parsing behavior.
app/Sources/Views/ChatView.swift Adds goal card UI and routes /goal commands via the parser.
app/Sources/Support/Goals/GoalCommandParser.swift Implements strict local parsing for /goal commands and errors.
app/Sources/Support/Goals/GoalActivityCoordinator.swift Adds an ActivityKit coordinator for goal Live Activity updates.
app/Sources/Support/Goals/GoalActivityAttributes.swift Defines ActivityKit attributes/content state shared by app + widget.
app/Sources/Support/ChatModel.swift Stores goal snapshot state, bridges goal callbacks to @MainActor, and hooks goal lifecycle actions into the model.
app/Sources/Generated/coven_pocket_ffi.swift Regenerated UniFFI Swift bindings for the new goal APIs/types.
app/Sources/CovenPocketApp.swift Pauses active goals when the scene transitions to background.
app/GoalWidgets/Info.plist Adds widget extension Info.plist.
app/GoalWidgets/GoalLiveActivityWidget.swift Adds the WidgetKit Live Activity/Dynamic Island UI.
.beads/issues.jsonl Updates Beads issue export with goal-related tracking issues/status changes.
.beads/interactions.jsonl Updates Beads interactions export with status change events.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev
BunsDev merged commit 76e3f92 into main Aug 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants